<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	template="/layout/page/form/page-fieldset-template.xhtml">
	
	<ui:param name="pvb" value="#{commonContentViewBean.parent}" />
	<ui:param name="pageViewBean" value="#{commonContentViewBean}" />
	<ui:param name="compTitle" value="选择用户" />

	<ui:param name="compId" value="#{commonContentViewBean.id}" />
	
	<ui:define name="compContent">
		<h:form style="margin:0;" id="#{compId}_cru_form">
	
			<h:panelGroup id="#{compId}_cru_main" layout="block" style="width:100%;">
				<ul id="#{compId}_cru_main" class="portal-dataview-ul">
					<!-- 当前组织机构的用户集 -->
					<ui:repeat value="#{commonContentViewBean.currentRoleUser}" var="node">
						<li id="#{compId},user,#{node.data.useruuid},#{node.data.userrealname}"
							style="width:100px;height:100px;cursor:pointer;" 
							onmouseover="jQuery(this).addClass('portal-dataview-li-hover')"
							onmouseout="jQuery(this).removeClass('portal-dataview-li-hover')"
							onclick="SinoPortal.PageView.dataView.click('#{compId}_cru_main',this)"
							class="portal-dataview-li">
							<p:graphicImage value="/img/component/system/user_64.png" style="margin:5px;width:64px;height:64px;" />
							<br />
							<h:outputText value="#{node.data.userrealname}" />
						</li>
					</ui:repeat>
				</ul>
			</h:panelGroup>
			
			<p:remoteCommand name="#{compId}_changeCurrentNode" actionListener="#{orgAction.changeCurrentNode}"
				update="#{compId}_right_main,#{compId}_right_bread">
			</p:remoteCommand>
			
		</h:form>
	</ui:define>

	<ui:define name="compButtons">
		<p:commandButton
			title="选择"
			onstart="alert('请选择提交的用户!')"
			oncomplete="#{commonContentViewBean.id}_dialog.hide();"
			image="./img/icons/add.png" value="选择" style="margin:5px;"
			>
			<h:inputHidden value="#{pageViewBean.id}" />
		</p:commandButton>
		
		<p:commandButton title="关闭" type="button"
			onclick="#{commonContentViewBean.id}_dialog.hide();"
			image="./img/icons/cancel.png" value="关闭" style="margin:5px;">
		</p:commandButton>
	</ui:define>
	
</ui:composition>
